<template>
    <div>

            <van-nav-bar
                    title="个人信息"
                    left-text="返回"
                    left-arrow
                    @click-left="onClickLeft"

            />

        <div class="box">
            <p>头像：</p>
            <div>
                <van-image
                        :src="$store.state.userInfo.avatar"
                        round
                        width="10rem"
                        height="10rem"
                       />
<!--                <img  alt="">-->
            </div>

        <div class="zhangHao">
            <span>账号：</span>
            <span>{{$store.state.userInfo.userName}}</span>
        </div>
        <div class="nickName">
            <span>昵称：</span>
            <span>{{$store.state.userInfo.loginName}}</span>
        </div>
        <div class="nickName">
            <span>手机号：</span>
            <span>{{$store.state.userInfo.phonenumber}}</span>
        </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "CheckInformation",
        methods:{
            onClickLeft() {
                // {path:'/myapp/ranVideo',query:{active:1}}
                this.$router.push({path:'/myapp/user',query:{active:3}});
            }
        },
        created() {
            this.$store.dispatch("asyncChangeLogin");
            // console.log(this.$store.state.userInfo)
            // checkInfo().then(res=>{
            //     console.log(res.data);
            // })
            console.log("进入")
        }

    }
</script>

<style scoped>
    .box{
        padding:16px;
    }
    .box>div{
        padding:10px;
    }
</style>